<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>模板编辑界面</title>
<s:include value="/WEB-INF/pages/common/reference.jsp" />
<bees:editor-import />
</head>
<body>
	<center>
		<div id="container">
			<form action="${fun:url('/backstage/style/template','edit','modify','') }">
				<s:hidden name="domain.id" value="%{#request.domain.id}" />
				<bees:editor style="width:100%;height:auto;"
					rows="[
						{name:'模板名称',height:'30px',editer:{
								type:'text',
								name:'domain.name',
								property:'name',
								placeholder:'请输入模板的名称',
								size:'30',
								validator:{rule:{required:true,maxlength:20},message:{required:'不能为空',maxlength:'长度不能大于20'}}
							}
						},
						{name:'路径',height:'30px',editer:{
								type:'select',
								name:'domain.directory',
								property:'directory',
								placeholder:'请输入模板静态化之后存放的路径',
								size:'30',
								url:'${fun:url('/backstage/io/file','paging','','scope=DIRECTORY')}'
							}
						},
						{name:'文件前缀',height:'30px',editer:{
								type:'text',
								name:'domain.prefix',
								property:'prefix',
								placeholder:'请输入模板静态化之后的前缀',
								size:'30'
							}
						},
						{name:'文件后缀',height:'30px',editer:{
								type:'text',
								name:'domain.suffix',
								property:'suffix',
								placeholder:'请输入模板静态化之后的后缀',
								size:'30'
							}
						},
						{name:'表',height:'30',editer:{
								type:'table',
								name:'domain.mapper',
								property:'mapper'
							}
						},
						{name:'条件',height:'30px',editer:{
								type:'select',
								name:'domain.criterion.id',
								placeholder:'请选择静态化数据需要满足的条件',
								property:'criterion.id',
								size:'30',
								url:'${fun:url('/backstage/clause/criterion','paging','','')}'
							}
						},
						{name:'排序',height:'30px',editer:{
								type:'select',
								name:'domain.sorting.id',
								placeholder:'请选择数据排序规则',
								property:'sorting.id',
								size:'30',
								url:'${fun:url('/backstage/clause/sorting','paging','','')}'
							}
						},
						{name:'限制',height:'30px',editer:{
								type:'select',
								name:'domain.restriction.id',
								placeholder:'请选择数据位置及数目的限制',
								property:'restriction.id',
								size:'30',
								url:'${fun:url('/backstage/clause/restriction','paging','','')}'
							}
						},
						{name:'范围',height:'30px',editer:{
								type:'enumeration',
								enumeration:'scope',
								name:'domain.scope',
								property:'scope'
							}
						},
						{name:'所属主题',height:'30px',editer:{
								type:'select',
								name:'domain.theme.id',
								placeholder:'请选择所属主题',
								property:'theme.id',
								size:'30',
								url:'${fun:url('/backstage/style/theme','paging','','')}'
							}
						},
						{name:'备注',height:'120px',editer:{
								type:'textarea',
								name:'domain.description',
								property:'description',
								style:'resize:none;',
								placeholder:'请输入备注',
								cols:'50',
								rows:'5'
							}
						},
						{name:'模板内容',height:'320px',editer:{
								type:'textarea',
								name:'domain.content',
								property:'content',
								style:'resize:none;',
								placeholder:'请编辑模板内容',
								cols:100,
								rows:20
							}
						}
					]"
					domain="${domain }" />
			</form>
		</div>
	</center>
</body>
</html>